<?php
class AlertWidget extends CWidget
{
    public function run()
    {
        $keys = array(      
            'success',
            'info',
            'warning',
            'error',
        );

        foreach($keys as $k){
            if($msg = Yii::app()->user->getFlash($k)){
                echo '<blockquote class="shortcode-blockquote '.$k.'">'.$msg.'</blockquote>';
                break;
            }
        }
    }
}